
#pragma once

#include <gpiod.h>
#include <vector>
#include <string>
#include <chrono>
#include <thread>

#include <stdio.h>
#include <unistd.h>
#include <libserialport.h>

#include <iostream>

#include "rs485_v3.hpp"
#include "agile_modbus_rtu_master.hpp"
#include "yj_return.hpp"
#include "config.h"

typedef struct
{
    uint32_t distance;//mm
}myantenna_laser_data_t,*Pmyantenna_laser_data_t;


yj_return myantenna_laser_init(void);
void myantenna_laser_deinit(void);
yj_return myantenna_laser_read_all(myantenna_laser_data_t *data);
void myantenna_laser_print_data(myantenna_laser_data_t *data);